<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" id="viewport" content="width=device-width, initial-scale=1">
    <title>个人信息</title>
    <link rel="stylesheet" href="../../front/css/common.css">
    <script type="text/javascript" src="../../front/js/jquery.min.js"></script>
    <script type="text/javascript" src="../../front/js/common.js"></script>
</head>
<body style="background: white;">
<div class="ly_header">个人信息<div class="ly_left goback"><img src="../../front/image/goback.png" alt=""></div></div>
<div class="insteadOf"></div>
<div class="detailmain">
    <form th:action="@{memberRegister.action}" method="post" autocomplete="off">
        <div class="information dw">
            <div class="informationname">微信名称：</div>
            <input class="informationinput color9 inputl5" name="wxNickName" th:value="${memberVO.wxNickName}" readonly type="text">
        </div>
        <div class="information dw">
            <div class="informationname color9">真实姓名：</div>
            <input class="informationinput color9 inputl5" name="realName" th:value="${memberVO.realName}"  type="text">
        </div>
        <div class="information dw">
            <div class="informationname color9">手机号：</div>
            <input class="informationinput inputl4" name="phone" th:value="${memberVO.phone}" type="text">
        </div>
        <div class="information dw">
            <div class="informationname color9">邮箱：</div>
            <input class="informationinput inputl3" name="memberEmail" th:value="${memberVO.memberEmail}" type="text">
        </div>
        <div class="information dw">
            <div class="informationname">性别：</div>
            <div class="informationinput inputl3 color9 selectgender" th:switch="${memberVO.memberSex}">
                <span th:case="MALE">男</span>
                <span th:case="FEMALE">女</span>
            </div>
            <input name="memberSex" readonly th:value="${memberVO.memberSex}" type="hidden">
        </div>
        <div class="information dw">
            <div class="informationname color9">工作单位：</div>
            <input class="informationinput inputl5" name="company" th:value="${memberVO.company}" type="text">
        </div>
        <div class="mart20" style="font-size: 0.8em;">
            <input class="registered_chech" type="checkbox">我已阅读 <a th:href="@{/front/notice/toNoticeList.action?id=1}">《会员须知》</a>
        </div>
        <div class="informationbtn">
            保存
        </div>
    </form>
</div>
<div id="mask" class="hide"></div>
<div class="hide gender drop-down">
    <div class="ly_header">性别
        <div class="ly_left genderno"><img src="../../front/image/no.png" alt=""></div>
        <div class="ly_right genderyes"><img src="../../front/image/yes.png" alt=""></div></div>
    <div class="insteadOf"></div>
    <ul class="selectlist genderlist" style="">
        <li dataval="MALE">男</li>
        <li dataval="FEMALE">女</li>
    </ul>
</div>
</body>
<script type="text/javascript" src="../../front/js/information.js"></script>
<script>
    /*<![CDATA[*/
    ctxPath = /*[[@{/}]]*/ '';
    /*]]>*/
    $(document).on("change",".detailmain input",function () {
        if($(this).val().length>0){
            $(this).siblings("div").removeClass("color9");
        }else{
            $(this).siblings("div").addClass("color9");
        }
        if($("div.color9").length==1){
            $(".informationbtn").addClass("btn_ok");
        }else{
            $(".informationbtn").removeClass("btn_ok");
        }
    });
    $(document).on("click",".btn_ok",function(){
        var data={};
        var flag=0;
        $(".detailmain input").each(function(){
            if($(this).val().trim()==""){
                flag=1;
            }
            if($(this).attr("name")=="check"){
                if($(this).attr('checked')){
                    flag=1;
                }
            }else{
                data[$(this).attr("name")]=$(this).val()
            }


        })
        if(flag==1){
            alert("请完善个人信息！");
            return;
        }else{
            $("form").submit();
        }

    })
</script>
</html>